const path = require('path');

let url = '../src/smile.jpg';
let cwd = process.cwd();
let realUrl = path.resolve(cwd, url);
console.log(realUrl);